<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<style>
    .yonghu{margin-right: 10px;border-radius: 50px;width: 50px;height: 50px;left: 1390px;top: 30px;}
    .denglu{display: flex;font-size: 20px;position: absolute;left: 1440px;top: 30px;color:#91b5ff ;}
</style>
<div class="denglu">
    <img src="img/02(1).png" class="yonghu">
    <%
        Object condition = session.getAttribute("condition");
        Object username = session.getAttribute("username");
        Object u_id = session.getAttribute("u_id");
//        System.out.println(u_id);
        System.out.println(condition);
//        System.out.println(username);
        if(condition==null)
        {
            out.println("<a href=\"denglu.jsp\" style=\"margin-top:10px \">登录</a>");
        }else {
//					System.out.println();
            out.println("\t\t\t\t<div>\n" +
                    "\t\t\t\t\t<div>"+username+"</div>\n" +
                    "\t\t\t\t\t<div style=\"cursor:pointer;\"  onclick=\"xx()\">退出</div>\n" +
                    "\t\t\t\t</div>");
        }
    %>

</div>

<script>
    function shous() {
        let text = document.getElementById("text").value
        window.location.href=`shous.jsp?text=` + text;
    }
    const xx = ()=>{

        window.location.href="denglu.jsp?tc=1";
    }
</script>
